package com.chnagli06.method_more;

public class valuetransfer {
    //基本数据类型
    public static void main(String[] args) {
        int n =10;
        int m = n;//传值 传递的是数据值
        n++;
        System.out.println("m:"+m+"/////n:"+n);
        //数组类型
        int [] arr1 = new int[]{1,2,3,4,5};
        int [] arr2 = arr1;
        arr1[0] = 10;
        System.out.println("arr1[0]:"+arr1[0]+"/////n:"+arr1[0]);
        //对象数据类型
        Person p1 = new Person();
        p1.age = 19;
        Person p2 = p1;
        p2.age = 20;
        System.out.println("p1.age:"+p1.age+"/////n:"+p1.age);
    }


}
class Person{
    int age;
}